﻿using System.Collections.Generic;
using SubsidiosBussinessLogic.DataAccess.Context;
using SubsidiosBussinessLogic.DataAccess.Interfaces;
using SubsidiosBussinessLogic.DataAccess.SqlServerRepository;

namespace SubsidiosWebMvc.CommonData
{
    public class BloqueHelper
    {
        public static Dictionary<int,string> BloqueList()
        {
            IBloqueRepository repository = new BloqueRepository(DataContextFactory.GetContext());
            var bloques = repository.GetBloques();
            var dic = new Dictionary<int, string>();
            foreach (var bloque in bloques)
            {
                dic.Add(bloque.BloqueId,bloque.Descripcion);
            }
            return dic;
        }
    }
}
